|
|
|
|
|
|
|
To round out your testing project, incorporate the logic from your test/scenario scripts into your form. Based on an examination of Test Scripts #1 and #2, you know you need the members listed in Table 6.1 for your form. |
|
|
|
|
| TABLE 6.1. SETTING UP THE FORMfrmAccountMainForm. | | Member | Name | | Form Caption | Basic Personal Checking | | Label (Account Number) | lblAccountMaintForm(0) | | Label (Deposit Amount) | lblAccountMainForm(1) | | Label (Error Message) | lblAcccountMainForm(2) | | TextBox | txtAccountNumber | | TextBox | txtDepositAmount | | CommandButton | cmdStore | | CommandButton | cmdDone |
|
|
|
|
|
|
For the Error Message label (lblAccountMaintForm(2)), set its BorderStyle to 1 Fixed Single. Your form will now look like Figure 6.13. |
|
|
|
|
|
|
|
|
Figure 6.13.
The frmAccountMaintForm form. |
|
|
|
|
|
|
|
|
You don't want the BasicPersonalChecking class communicating directly with the frmAccountMaintForm form. Therefore, add a class named FormController to control the flow of events from the form to the component. Add methods to the class that resembles Listing 6.2. In the form, enter the following declaration in General Declarations: |
|
|
|
|
|
|
|
|
Private theFormController As New FormController |
|
|
|
|
|
|
|
|
LISTING 6.2. THEFormControllerCLASS METHODS AND DECLARATIONS. |
|
|
|
 |
|
|
|
|
1: Private theForm As Form
2:
3: Public Sub setForm(argForm As Form)
|
|
|
|
|
|